<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use yii\widgets\Pjax;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $searchModel backend\modules\rbac\models\searchs\Assignment */
/* @var $usernameField string */
/* @var $extraColumns string[] */

$this->title = '分配';



$columns = [
    //['class' => 'yii\grid\SerialColumn'],
  [
    'class' => 'yii\grid\CheckboxColumn',
    'multiple'=> true,
    //'cssClass'=>'t',
    'name' => 'grid',
    'checkboxOptions'=>['class'=>'grid']
  ],
    $usernameField,
];
if (!empty($extraColumns)) {
    $columns = array_merge($columns, $extraColumns);
}
//$columns[] = [
//    'class' => 'yii\grid\ActionColumn',
//    'template' => '{view}'
//];
?>

<div class="ibox float-e-margins" id="bx_search_form">
    <div class="ibox-title">
      <?= Html::a('查看', '#', ['class' => 'btn btn-success  BX_action_id','data-href'=>Url::to(['view'])]) ?>
    </div>
</div>



<div class="ibox-content">

  <div class="role-index">
        <?php //Pjax::begin(); ?>
        <?=
        GridView::widget([
            'options' => ['class' => 'grid-view','id' => 'grid'],
            'dataProvider' => $dataProvider,
            'filterModel' => $searchModel,
            'columns' => $columns,
        ]);
        ?>
        <?php //Pjax::end(); ?>


  </div>
</div>
